# 读取 csv文件
import unittest
from interfaceFramework.funcDemo.CaleDemo import Cale
from interfaceFramework.Commonlib.ReadCsv import ReadCsv


class Test2(unittest.TestCase):
    def setUp(self) -> None:
        print("start")

    def tearDown(self) -> None:
        print("end")

    def test001(self):
        c = Cale()
        rea = ReadCsv()
        m_list = rea.read_csv("../DataXml/sum.csv")
        for mi in m_list:
            rel = c.sum(int(mi[0]), int(mi[1]))
            self.assertEqual(rel, int(mi[2]))

    def test002(self):
        c = Cale()
        rea = ReadCsv()
        m_list = rea.read_csv("../DataXml/sum.csv")
        for mi in m_list:
            rel = c.sum(int(mi[0]), int(mi[1]))
            self.assertEqual(rel, int(mi[2]))

    def test003(self):
        c = Cale()
        rea = ReadCsv()
        m_list = rea.read_csv("../DataXml/sum.csv")
        for mi in m_list:
            rel = c.sum(int(mi[0]), int(mi[1]))
            self.assertEqual(rel, int(mi[2]))


if __name__ == '__main__':
    unittest.main()
